package com.lsh.oms.api.model.order;

import com.lsh.oms.api.model.ValidationMessage;

import org.hibernate.validator.constraints.NotBlank;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

/**
 * 订单明细
 * Created by huangdong on 16/8/1.
 */
public class OrderCreateDetail implements Serializable {

    private static final long serialVersionUID = 7575822264355756413L;

    /**
     * 类型
     */
    //type
    @NotNull(message = ValidationMessage.NOT_NULL)
    @Range(min = 1, max = 3, message = " must be 1 or 2 or 3.")
    private Integer type;

    /**
     * 商品SKU编码
     */
    @NotNull(message = ValidationMessage.NOT_NULL)
    @Min(value = 0, message = ValidationMessage.ERROR)
    private Long skuCode;

    /**
     * 商品编码
     */
    //sku_id
    @NotNull(message = ValidationMessage.NOT_NULL)
    @Min(value = 0, message = ValidationMessage.ERROR)
    private Long goodsCode;

    /**
     * 商品名称
     */
    //sku_name
    @NotBlank(message = ValidationMessage.NOT_BLANK)
    private String goodsName;

    /**
     * 商品条码
     */
    //barcode
    private String goodsBarcode;

    /**
     * 商品售卖单位
     */
    //sale_unit
    @NotNull(message = ValidationMessage.NOT_NULL)
    @Min(value = 1, message = ValidationMessage.ERROR)
    private BigDecimal goodsSaleUnit;

    /**
     * 商品版本
     */
    //version_id
    @NotNull(message = ValidationMessage.NOT_NULL)
    @Min(value = 0, message = ValidationMessage.ERROR)
    private Long goodsVersion;

    /**
     * 商品其它属性
     */
    private String goodsExtAttrs;

    /**
     * 原价
     */
    //origin_price
    @NotNull(message = ValidationMessage.NOT_NULL)
    @DecimalMin(value = "0", message = ValidationMessage.ERROR)
    private BigDecimal originalPrice;

    /**
     * 售价
     */
    //saled_price
    @NotNull(message = ValidationMessage.NOT_NULL)
    @DecimalMin(value = "0", message = ValidationMessage.ERROR)
    private BigDecimal sellingPrice;

    /**
     * 单价
     */
    //price
    @NotNull(message = ValidationMessage.NOT_NULL)
    @DecimalMin(value = "0", message = ValidationMessage.ERROR)
    private BigDecimal price;

    /**
     * 数量
     */
    //qty
    @NotNull(message = ValidationMessage.NOT_NULL)
    @DecimalMin(value = "1", message = ValidationMessage.ERROR)
    private BigDecimal quantity;

    /**
     * 套餐编号
     */
    //package_id
    @Min(value = 0, message = ValidationMessage.ERROR)
    private Long packageCode;

    /**
     * 赠品来源商品编码
     */
    //give_from
    @Min(value = 0, message = ValidationMessage.ERROR)
    private Long giftSrcCode;

    /**
     *
     */
    //img_list
    private String imgList;


    /**
     * 活动信息{["activity_id":"","activity_name":"","coupon_money":""]}
     */
    //activity_info
    private String activityInfo;

    /**
     *
     */
    //order_package_info
    private String orderPackageInfo;

    /**
     * 赠品信息
     */
    //give_info
    private String giveInfo;

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public Long getSkuCode() {
        return skuCode;
    }

    public void setSkuCode(Long skuCode) {
        this.skuCode = skuCode;
    }

    public Long getGoodsCode() {
        return goodsCode;
    }

    public void setGoodsCode(Long goodsCode) {
        this.goodsCode = goodsCode;
    }

    public String getGoodsName() {
        return goodsName;
    }

    public void setGoodsName(String goodsName) {
        this.goodsName = goodsName;
    }

    public String getGoodsBarcode() {
        return goodsBarcode;
    }

    public void setGoodsBarcode(String goodsBarcode) {
        this.goodsBarcode = goodsBarcode;
    }

    public BigDecimal getGoodsSaleUnit() {
        return goodsSaleUnit;
    }

    public void setGoodsSaleUnit(BigDecimal goodsSaleUnit) {
        this.goodsSaleUnit = goodsSaleUnit;
    }

    public Long getGoodsVersion() {
        return goodsVersion;
    }

    public void setGoodsVersion(Long goodsVersion) {
        this.goodsVersion = goodsVersion;
    }

    public String getGoodsExtAttrs() {
        return goodsExtAttrs;
    }

    public void setGoodsExtAttrs(String goodsExtAttrs) {
        this.goodsExtAttrs = goodsExtAttrs;
    }

    public BigDecimal getOriginalPrice() {
        return originalPrice;
    }

    public void setOriginalPrice(BigDecimal originalPrice) {
        this.originalPrice = originalPrice;
    }

    public BigDecimal getSellingPrice() {
        return sellingPrice;
    }

    public void setSellingPrice(BigDecimal sellingPrice) {
        this.sellingPrice = sellingPrice;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public BigDecimal getQuantity() {
        return quantity;
    }

    public void setQuantity(BigDecimal quantity) {
        this.quantity = quantity;
    }

    public Long getPackageCode() {
        return packageCode;
    }

    public void setPackageCode(Long packageCode) {
        this.packageCode = packageCode;
    }

    public Long getGiftSrcCode() {
        return giftSrcCode;
    }

    public void setGiftSrcCode(Long giftSrcCode) {
        this.giftSrcCode = giftSrcCode;
    }

    public String getImgList() {
        return imgList;
    }

    public void setImgList(String imgList) {
        this.imgList = imgList;
    }

    public String getActivityInfo() {
        return activityInfo;
    }

    public void setActivityInfo(String activityInfo) {
        this.activityInfo = activityInfo;
    }

    public String getOrderPackageInfo() {
        return orderPackageInfo;
    }

    public void setOrderPackageInfo(String orderPackageInfo) {
        this.orderPackageInfo = orderPackageInfo;
    }

    public String getGiveInfo() {
        return giveInfo;
    }

    public void setGiveInfo(String giveInfo) {
        this.giveInfo = giveInfo;
    }
}
